// 自定义指令来监听滚动事件
export default {
    bind(el, binding) {
        const scrollContainer = el;
        scrollContainer.addEventListener('scroll', () => {
            const threshold = 10;
            const position = scrollContainer.scrollTop + scrollContainer.clientHeight;
            if (position >= scrollContainer.scrollHeight - threshold) {
                binding.value();
            }
        });
    },
};